package com.huowenjie.controller;

import com.huowenjie.entity.Dan;
import com.huowenjie.entity.DanExample;
import com.huowenjie.mapper.DanMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DanController {

    @Autowired
    DanMapper danMapper;

    @RequestMapping("list")
    public List<Dan> list(){
        DanExample danExample = new DanExample();
        List<Dan> dans = danMapper.selectByExample(danExample);
        return dans;
    }

}
